package razie.draw.swing;

import razie.draw._
import razie.draw.widgets._
import com.razie.pub.resources._

import scala.swing._

class NavLinkRenderer extends Renderer[NavLink] {

   override def render(b:NavLink , t:Technology , out:DrawStream ) :AnyRef = {

      var icon = RazIconRes.getIconFile(b.action.iconProp);

      // if not std property, then it's full url
      if (icon == null || icon.length() <= 0) {
         icon = b.action.iconProp;
      }

      
      new Button (Action(b.action.label){if (b.ati!=null)b.ati.act(null) });
     }

 }
